Justin fixes mem leak introduced in last change.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 1 Apr 2005 22:25:26 +0000 (22:25 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 1 Apr 2005 22:25:26 +0000 (22:25 +0000)
gpsbabel/coastexp.c

index 15b50aae3dfaf6fc8b9263565463a2dd5f49cf72..faef555f54068dec812f034de384ea44e629cb93 100755 (executable)
@@ -168,8 +168,11 @@ ce_start(void *data, const char *el, const char **attr)
 static void
 ce_end(void *data, const char *el)
 {
-       if (0 == strcmp(el, "Route"))
+       if (0 == strcmp(el, "Route")) {
+               if (!doing_rtes)
+                       ce_free_route(currentRoute);
                inRoute = 0;
+       }
        else if (0 == strcmp(el, "Mark"))
                inMark = 0;
 }